#include "app_cloud.h"


const static char *TAG = "CLOUD";

TaskHandle_t AppCloud::taskHandle = NULL;
TimerHandle_t AppCloud::timerHandle = NULL;
AppCloud CloudObj;



void AppCloud::threadtimeCallback(TimerHandle_t handle)
{
   
}

// void AppCloud::process()
// {
//     while(1)
//     {
//         aws_iot_dev_init();
//         vTaskDelay(2); 
//     }

// }


void AppCloud::thread(void *a)
{
    AppCloud::timerHandle = xTimerCreate(TAG, pdMS_TO_TICKS(CLOUD_TASK_TIME), true, NULL, AppCloud::threadtimeCallback);
    xTimerStart(AppCloud::timerHandle,pdMS_TO_TICKS(CLOUD_TASK_TIME));
    while(1)
    {
       // CloudObj.process();
        vTaskDelay(2); 
    }
}


void AppCloud::threadCreate()
{
   xTaskCreate(AppCloud::thread, TAG, CLOUD_STACK_SIZE, NULL, CLOUD_TASK_PRIO, &(AppCloud::taskHandle));
}


